<?php
$loginIdStr = Yii::t('BWeSport', 'Login Id');
$userNameStr = Yii::t('BWeSport', 'User Name');
$emailStr = Yii::t('BWeSport', 'Email');
$mobileStr = Yii::t('BWeSport', 'mobile');
$personInfoStr = Yii::t('BWeSport', 'person info');
$modifyInfoStr = Yii::t('BWeSport', 'modify info');
$changePasswordStr = Yii::t('BWeSport', 'change password');
$applyMemberStr = Yii::t('BWeSport', 'apply Member');
$cardNumStr = Yii::t('BWeSport', 'card num');
?>
<?php
/*
 * this function will show user's info:
 * 1)user loginId
 * 2)user email
 * 3)user other info
 */
$user = Blyn::app()->getCurrentUser();
$userInfo = $user->getAttribute('userInfo');
$attributes = array();
if ($userInfo) {
    $attributes = $userInfo->getChildren();
}
?>
<style>
.userCard{
    padding-top: 18px;text-align: center;
    font-family: 'Helvetica Neue',sans-serif;
    overflow-x: hidden;
    background: url('http://imgcache.life.qq.com/www/misc/images/wei_webapp_new/bk_repeat1_3.jpg') repeat-y right 0, url('http://imgcache.life.qq.com/www/misc/images/wei_webapp_new/bk_repeat1_2.jpg') repeat-y left 0, url('http://imgcache.life.qq.com/www/misc/images/wei_webapp_new/bk_top1_1.jpg') repeat-x 0 0, url('http://imgcache.life.qq.com/www/misc/images/wei_webapp_new/bk_repeat1_1.jpg') repeat 0 0, #864c2c;
    background-size: 3.5px 23.5px, 3.5px 23.5px, 304.5px 93px, 313px 23.5px;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}
.card{
    width: 267px;
    height: 159px;
    border-radius: 8px;
    text-align: left;
    box-shadow: 0 0 4px rgba(0,0,0,.6);
    margin: 0 auto 0 auto;
    position: relative;
    background: url('http://imgcache.life.qq.com/www/misc/images/wei_webapp_new/card_bk_1.png') no-repeat 0 0;
    background-size: 267px 159px;
    }
.card .logo {
    max-height: 100px;
    margin: 18px 0 0 18px;
}
 .card h2 {
    position: absolute;
    top: 3px;
    right: 8px;
    font-size: 9px;
    line-height: 22px;
    text-align: right;
    color: #EDD3BA;
    text-shadow: 1px 1px #A69079;
    margin: 0;
    padding: 0;
}
.card .verify {
    display: inline-block;
    height: 40px;
    top: 100px;
    right: 12px;
    text-align: right;
    line-height: 24px;
    color: #92724C;
    font-size: 20px;
    text-shadow: 0 1px rgba(223, 233, 243, .62);
}
.pdo {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-block;
}
.card .verify span {
    display: inline-block;
    text-align: left;
    color: #92714e;
    text-shadow: 0 1px #f1e7dc;
}
 .card .verify em {
    display: block;
    line-height: 13px;
    font-size: 10px;
    font-weight: normal;
    font-style: normal;
    color: #92714e;
    text-shadow: 0 1px #f1e7dc;
}
.inner>p {
    text-align: center;
    line-height: 36px;
    margin-bottom: 6px;
    min-height: 10px;
    margin: 0;
    padding: 0;
}
.inner>p span {
    font-size: 14px;
    color: #646464;
    text-shadow: 0 1px #fff;
    padding-left: 20px;
    display: inline-block;
    background: url('http://imgcache.life.qq.com/www/misc/images/wei_webapp_new/show1.jpg') no-repeat 0 50%;
    -webkit-background-size: 13px 14.5px;
    background-size: 13px 14.5px;
    margin: 0;
    text-align: center;
    line-height: 36px;
}
ul.round {
    text-align: left;
    font-size: 14px;
    line-height: 24px;
    overflow: hidden;
    border-radius: 5px;
    border: solid #C2C2C2;
    border-width: 1px 1px 0 1px;
    box-shadow: 0 1px 1px #f6f6f6;
    background-color: #f5f5f5;
    list-style-type: none;
    padding: 0px;
    margin: 0;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 15px;
}
.round>li {
    border: solid #C2C2C2;
    border-width: 0 0 1px 0;
    padding: 9px 10px 6px 10px;
    background: url('http://imgcache.life.qq.com/www/misc/images/wei_webapp_new/icon_power2.png') no-repeat 9px 14px;
    background-size: 24px 21px;
}
 .round>li>article>a {
    color: #2D2D2D;
    display: block;
    height: 38px;
    line-height: 30px;
    padding-left: 30px;
}
.round li.power article>a>p {
    display: inline-block;
    padding-right: 17px;
    text-align: inherit;
    line-height: inherit;
    min-height: 0;
    margin: 0;
    padding: 0;
}
#ajax-loaderdiv {position: fixed;top: 0;left: 0;width: 100%;height: 100%;z-index: 35000;background-color: rgba(0, 0, 0, 0.3);display: none;}
.ajax-loader {position: absolute;left: 50%;top: 50%;margin-left: -16px;margin-top: -16px;display: block;}
</style>
<div id="ajax-loaderdiv" style="display: none;">
    <img src="/billyn-dev/images/ajax-loader.gif" class="ajax-loader">
</div>
<div class="userCard">
<div style="height: 100%;" class="inner">
    <div class="card">
    <img src="<?php echo Yii::app()->request->baseUrl.'/images/mobile/ham1.png';?>" class="logo">
    </div>
<!--<p><span>使用时向服务员出示此卡</span></p>-->
<ul class="round">
    <li class="power">
        <article>
            <a href="#">
                <p><?php echo $userNameStr.':';?><?php echo $user->userName; ?></p>
            </a>
        </article>
    </li>
    <?php
foreach ($attributes as $attr) {
    if($attr->getName() == 'mobile'){
        ?>
    <li class="power">
        <article>
            <a href="#">
                <p>手机号码：<?php echo $attr->getValue(); ?>
                </p>
            </a>
        </article>
    </li>
    <?php
    }
    if($attr->getName() == 'useridcard'){
        ?>
    <li class="power">
        <article>
            <a href="#">
                <p>身份证号：<?php echo $attr->getValue(); ?>
                </p>
            </a>
        </article>
    </li>
    <?php
      }
    if($attr->getName() == 'bankNum'){
        ?>
    <li class="power">
        <article>
            <a href="#">
                <p>银行卡号：<?php echo $attr->getValue(); ?>
                </p>
            </a>
        </article>
    </li>
    <?php
      }
}
    ?>
</ul>
</div>
</div>
